package com.qqtech.qquan.order.service;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import com.qqtech.core.frame.service.BaseService;
import com.qqtech.qquan.order.model.OrderItem;
import com.qqtech.qquan.order.model.OrderItemQuery;
import com.qqtech.qquan.order.model.OrderItemVo;

public interface OrderItemService extends BaseService<OrderItem> {
	
	/**
	 * 根据订单号获取订单明细
	 * @param orderNo 订单号
	 * @return
	 */
	public List<OrderItem> findByOrderNo(String orderNo);

	/**
	 * 后台查询订单商品-分页
	 * @param query
	 * @param pageable
	 * @return
	 */
	public Page<OrderItemVo> queryPageList4Admin(OrderItemQuery query, Pageable pageable);

	/**
	 * 后台查询订单商品-列表
	 * @param query
	 * @param pageable
	 * @return
	 */
	public List<OrderItemVo> queryList4Admin(OrderItemQuery query, Pageable pageable);

	
	/**
	 * 查询列表
	 * @param orderItemIds 主键列表
	 * @return
	 */
	public List<OrderItemVo> getListByItemIds(List<Integer> orderItemIds);

	/**
	 * 后台-用户列表-数量查询
	 * @param query
	 * @return
	 */
	public int queryCount4Admin(OrderItemQuery query);
}